home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 …ember: Reference Library / Dev.CD Dec 00 RL Disk 1.toast / pc / technical documentation / develop / additional articles / timing on the macintosh / timing code / src / microsecondtrap.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-20  |  776 b   |  38 lines

  1. /*                                    MicrosecondTrap.h                                */
  2. /*
  3.  * MicrosecondTrap.h
  4.  * Copyright © 1994 Apple Computer Inc.
  5.  */
  6. #ifndef __MicrosecondTrap__
  7. #define __MicrosecondTrap__
  8. #include <Types.h>
  9. #include <Traps.h>
  10. #include <Timer.h>
  11.  
  12.  
  13. /*
  14.  * TRUE if the Microsecond Trap is present.
  15.  */
  16. Boolean                        MicrosecondTrapPresent(void);
  17.  
  18. /*
  19.  * Convert a Microsecond value to a double-precision number of microseconds.
  20.  */
  21. double                        MicrosecondToDouble(
  22.         register const UnsignedWide    *epochPtr
  23.     );
  24.  
  25. /*
  26.  * Return the difference between two Microsecond Trap values.
  27.  * Integer subtraction is used to preserve accuracy.
  28.  */
  29. void
  30. MicrosecondDelta(
  31.         register const UnsignedWide    *startPtr,
  32.         register const UnsignedWide    *endPtr,
  33.         register UnsignedWide        *result
  34.     );
  35. #endif /* __MicrosecondTrap__ */
  36.  
  37.  
  38.